<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- 除了null和undefined(直接不显示)，都会转成字符串进行显示 -->
      <p>{{ obj }}</p>
    </div>

    <script src="./Vue3.js"></script>
    <script>
      const { createApp } = Vue;

      createApp({
        data() {
          return {
            obj: {
              a: 3,
              b: {
                x: 10,
                y: 20,
              },
            },
          };
        },
        mounted() {
          setTimeout(() => {
            // this.obj.b.x = 30;
            this.obj.c = 4;
          }, 2000);
        },
      }).mount("#app");
    </script>
  </body>
</html>
